package com.module.shici.sql;

import androidx.room.Dao;
import androidx.room.Query;

import java.util.List;

@Dao
public interface ShiCiDao {
    //查询全部
    @Query("select * from ShiCi")
    List<ShiCi> getShiCiData();
    //根据标签查询
    @Query("select * from ShiCi where tag like '%' || :tag || '%'")
    List<ShiCi> getShiCiByTag(String tag);
    //根据作者查询
    @Query("select * from ShiCi where author like '%' || :author || '%'")
    List<ShiCi> getShiCiByAuthor(String author);
    //查询作者并限制在前100条
    @Query("select name from Author limit 100")
    String[] getAuthorList();
}
